//
//  AIVoiceResultBean.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/2/27.
//

import Foundation
//AI 通用回调
class AIChatResultMinmaxBean : Codable {
    var usage: Usage? = nil
    var reply: String? = nil
    
    class Usage : Codable {
        var total_tokens: Int64  = 0
    }
    class Choices : Codable {
        var message: Messages? = nil
    }
    class Messages : Codable {
        var content: String? = nil
    }
    
    
    func getReplyStr(_ isDelBracket: Bool = false) -> String {
        return deleteAiStr(reply ?? "", false)
    }
    
    func getToken() -> Int64 {
           return usage?.total_tokens ?? 0
    }
    
}
